

package commandz.cli;

import commandz.var.Variable;


/**
 *  Abstract Data Type that identifies a Variable object.
 */
public class Parameter implements Identifier
{
    protected String name;
    protected String description;
    protected Variable var;


    /**
     *  Initializes a new Parameter-instance for use with the
     *  given Variable-object, a name and a description.
     *
     *  @param var         A Variable object to use for storage of
     *                     the value of this parameter.
     *  @param name        A name for this parameter.
     *  @param description A description of this parameter.
     */
    public Parameter(Variable var, String name, String description)
    {
        this.name = name;
        this.description = description;
        this.var = var;
    }


    /**
     *  Returns the name of this Parameter.
     *
     *  @see Identifier
     */
    public String getName()
    {
        return this.name;
    }


    /**
     *  Returns a description of this Parameter.
     *
     *  @see Identifier
     */
    public String getDescription()
    {
        return this.description;
    }


    /**
     *  Returns the Variable in which the value of
     *  this Parameter can be stored.
     */
    public Variable getVariable()
    {
        return this.var;
    }
}
